//
//  CarInfoModel.m
//  carcareIOS
//
//  Created by ileo on 16/8/9.
//  Copyright © 2016年 chezheng. All rights reserved.
//

#import "CarInfoModel.h"

@implementation CarInfoModel
-(void)fillModelWithDic:(NSDictionary *)dic
{
    [super fillModelWithDic:dic];
    
    if ([self.carno isNotNil]) {
        self.carNoCityStr = [self.carno substringToIndex:1];
        self.carNoNumStr = [self.carno substringFromIndex:1];
    }
}
- (void)setCarNoCityStr:(NSString *)carNoCityStr
{
    _carNoCityStr = carNoCityStr;
    if ([self.carno isNotNil] && (![self.carNoNumStr isNotNil])) {
        self.carno = [NSString stringWithFormat:@"%@%@",carNoCityStr,[self.carno substringFromIndex:1]];
    }else self.carno = [NSString stringWithFormat:@"%@%@",carNoCityStr,self.carNoNumStr];
    
}
- (void)setCarNoNumStr:(NSString *)carNoNumStr
{
    _carNoNumStr = carNoNumStr;
    if ([self.carno isNotNil] && (![self.carNoCityStr isNotNil])) {
        self.carno = [NSString stringWithFormat:@"%@%@",[self.carno substringToIndex:1],carNoNumStr];
    }else self.carno = [NSString stringWithFormat:@"%@%@",self.carNoCityStr,carNoNumStr];
}


@end
